[<tag id="resourcepath" type="meta" value="/DesktopModules/NBright/NBrightEspace/App_LocalResources/" />]
[Template:scriptincludes.html]
<script>
	
	$(function() {
		$( "#tabs" ).tabs();
		$.datepicker.setDefaults($.datepicker.regional[['en-GB']]);
		$('input[[name$="dateRenewal"]]').datepicker();
		$('input[[name$="dateonline"]]').datepicker();
		$('input[[name$="dateupgrade"]]').datepicker();
	}); 

$(document).ready(function(){
    var cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?cmd=getdata&templ=weburl.xsl&ctltype=WEBURLXREF&itemid=[<tag type="valueof" xpath="genxml/hidden/itemid" />]';
	$.fn.initlist('.websiteurls', '.ajaxbutton', cmdget);
	
	$("a.clickpass").click(function(event){
	var confirm_box = confirm('Generate New Password? (old password will be lost)');
    if (confirm_box) {
		$('input[[name$="txtClientPass"]]').val(generatePassword(8,1));
    }
    });
	
	//Tasks
	myParams = {cmd: "getdata",templ: "taskslist.xsl",ctltype: "TASKS",filter: " and ([xmlData].value('(genxml/hidden/websiteid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
	cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
	$.fn.initlist('.tasks', '', cmdget);


});


function generatePassword(limit, inclNumbers) {
    var vowels = 'aeiou'.split('');
    var constonants = 'bcdfghjklmnpqrstvwxyz'.split('');
    var word = '', i, num;

    if (!limit) limit = 8;

    for (i = 0; i < (inclNumbers ? limit - 3 : limit); i++) {
        if (i % 2 == 0) { // even = vowels
            word += vowels[[Math.floor(Math.random() * 4)]]; 
        } else {
            word += constonants[[Math.floor(Math.random() * 20)]];
        } 
    }

    if (inclNumbers) {
        num = Math.floor(Math.random() * 99) + '';
        if (num.length == 1) num = '00' + num;
        else if (num.length == 2) num = '0' + num;
        word += num;
    }

    return word.substr(0, limit);
}

</script>	

<div class="nwb-button-group">
[<tag id="cmdUpdate1" type="linkbutton" text="Save" tooltip="Update" commandname="Update" cssclass="nwb-button primary icon approve" commandargument="ItemID"/>]&nbsp;
[<tag id="cmdUpdate2" type="linkbutton" text="Save and Exit" tooltip="Update and Exit" commandname="Updateexit" cssclass="nwb-button primary icon approve" commandargument="ItemID"/>]&nbsp;
[<tag id="cmdDelete1" type="linkbutton" text="Delete" tooltip="Delete" cssclass="nwb-button danger icon remove" commandname="Delete" commandargument="ItemID" confirm="Delete Item?" />]&nbsp;
[<tag id="cmdCancel1" type="linkbutton" text="Cancel" tooltip="Cancel" commandname="Cancel" cssclass="nwb-button danger" commandargument="ItemID" causesvalidation="False"/>]&nbsp;
</div>

<div>
[<tag id="WebsiteRef" type="hidden" value="" />]
[<tag id="ProjectRef" type="hidden" value="" />]
[<tag id="CreatedBy" type="hidden" value="" />]
[<tag id="ItemID" type="hidden" value="databind:ItemID" />]
[<tag id="LockedBy" type="hidden" value="" />]
[<tag id="htmlDisplayLockedBy" type="hidden" value="" />]
[<tag type="valueof" xpath="genxml/hidden/htmldisplaylockedby" />]
[<tag id="txtprimaryurl" type="hidden" value="" />]

<table class="normal" border="0px" cellpadding="1px" cellspacing = "1px">
<tr>
<td>


<table class="normal" border="0px" cellpadding="1px" cellspacing = "1px">
<tr>
<td align="right">Website Ref : </td>
<td>[<tag type="valueof" xpath="genxml/hidden/websiteref" />]</td>
</tr>
<tr>
<td align="right">Friendly Name : </td>
<td>[<tag id="txtWebsiteName" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">Database Server : </td>
<td>[<tag id="txtDBServer" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">Database Name : </td>
<td>[<tag id="txtDBName" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">IIS Server Name : </td>
<td>[<tag id="txtServerName" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">DNN Install : </td>
<td>[<tag id="txtDNNInstall" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">Map Path : </td>
<td>[<tag id="txtMapPath" type="textbox" width="400" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">Live IP : </td>
<td>[<tag id="txtLiveIP" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">DNN version : </td>
<td>[<tag id="txtdnnversion" type="textbox" width="250" maxlength="200" />]</td>
</tr>
<tr>
<td align="right">Date On-Line : </td>
<td>[<tag id="dateonline"  datatype="date" type="textbox" width="100" />]</td>
</tr>
<td align="right">Upgrade Date : </td>
<td>[<tag id="dateupgrade"  datatype="date" type="textbox" width="100" />]</td>
</tr>
</tr>
<td align="right">Type : </td>
<td>[<tag id="ddlWebsiteType" type="dropdownlist" width="150" datavalue="0;1;2;3;4;5" data=";NBS E-Commerce;NBS Other;Bespoke;NBVisibility;Other" />]</td>
</tr>
</table>

</td>
<td>

[Template:ClientBasicSelect.html]

<br/>
Client Password : [<tag id="txtClientPass" type="textbox" width="100" maxlength="30" />]
<a href="javascript:void();" class="clickpass nwb-button">Generate Password</a>
</td>
</tr>
</table>
<div>
Notes : <br/>
[<tag id="txtWebNotes" type="textbox" height="100" width="800" maxlength="2000" textmode="MultiLine" />]
</div>

			<br/>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">General</a></li>
				<li><a href="#tabs-3">SEO</a></li>
				<li><a href="#tabs-4">Tasks</a></li>
				<li><a href="#tabs-2">History</a></li>
			</ul>
			<div id="tabs-1">
<table>
<tr>
<td valign="top">
			
<table>
<tr>
<td align="right">Payment Type : </td>
<td>[<tag id="ddlPayType" type="dropdownlist" width="150" datavalue="1;2;3;4;5" data="Disabled;Online/Chq;Transfer;Direct Debit;Other" />]</td>
</tr>
<tr>
<td align="right">Renewal Date : </td>
<td>[<tag id="dateRenewal"  datatype="date" type="textbox" width="100" />]</td>
</tr>
<tr>
<td align="right">Monthly Support Cost : </td>
<td>[<tag id="txtsupportcost" type="textbox" width="90" maxlength="10" text="0" datatype="Double" />](excl. VAT)[<tag id="rvCost2" ctrltype="rvalidator" errormessage="Cost Error" text="ERR!" controltovalidate="txtsupportcost" minimumvalue="0" maximumvalue="99999" type="Currency"/>]</td>
</tr>
<tr>
<td align="right">Monthly Hosting Cost : </td>
<td>[<tag id="txthostingcost" type="textbox" width="90" maxlength="10" text="0" datatype="Double" />](excl. VAT)[<tag id="rvCost3" ctrltype="rvalidator" errormessage="Cost Error" text="ERR!" controltovalidate="txthostingcost" minimumvalue="0" maximumvalue="99999" type="Currency"/>]</td>
</tr>
<tr>
<td align="right">Total Monthly Cost : </td>
<td>[<tag id="txtCost" type="textbox" width="90" maxlength="10" text="0" datatype="Double" />](excl. VAT)[<tag id="rvCost" ctrltype="rvalidator" errormessage="Cost Error" text="ERR!" controltovalidate="txtCost" minimumvalue="0" maximumvalue="99999" type="Currency"/>]</td>
</tr>
<tr>
<td align="right">Training required : </td>
<td>[<tag id="chktrainingrequired" type="checkbox" text="Training has not been done." />]</td>
</tr>
<tr>
<td align="right">Contract Outstanding : </td>
<td>[<tag id="chkContractOut" type="checkbox" text="Contract has not been returned" />]</td>
</tr>
<tr>
<td align="right">Closed : </td>
<td>[<tag id="chkClosed" type="checkbox" text="Website Offline and Closed" />]</td>
</tr>
</table>

</td>
<td valign="top">
<div class="nwb-button-container">
[<tag id="cmdSelectUrl" type="linkbutton" text="Add Url" tooltip="Select Url" commandname="SelectUrl" cssclass="nwb-button primary icon add" commandargument="ItemID" />]
</div>
<div class="websiteurls">
</div>
</td>
</tr>
</table>
			</div>
			
			<div id="tabs-3">
			<table>
			<tr>
			<td align="right">Title : </td><td>[<tag id="txtWebTitle" type="textbox" width="600" maxlength="200" />]</td>
			</tr>
			<tr>
			<td align="right">Description : </td><td>[<tag id="txtWebDesc" type="textbox" height="100" width="600" maxlength="2000" textmode="MultiLine" />]</td>
			</tr>
			<tr>
			<td align="right">Keywords : </td><td>[<tag id="txtWebKeywords" type="textbox" height="100" width="600" maxlength="2000" textmode="MultiLine" />]</td>
			</tr>
			</table>						
			</div>
			<div id="tabs-4">
				<div class="tasks">
				</div>
			</div>
			<div id="tabs-2">
			[Template:HistoryAuditCtrl.html]
			</div>
		</div>

        <font size="1px">Last Modified : [<tag type="valueof" databind="ModifiedDate" />]</font>
</div>

